import { axios } from '@/utils/request'

const api = {
  // 提现列表
  withdrawList: '/saas/profit-cash',
  // 审核提现申请
  changeStatus: '/saas/profit-cash-audit',
  // 删除提现申请
  delApply:'/saas/profit-cash-del',
  // 创建提现申请
  createApply:'/salesman/audit',
  // 代理商收入明细
  incomeLog:'/salesman/price-log'
}

export default api

export function withdrawList (parameter) {
  return axios({
    url: api.withdrawList,
    method: 'get',
    params: parameter
  })
}

export function changeStatus (parameter) {
  return axios({
    url: api.changeStatus,
    method: 'post',
    data: parameter
  })
}

export function delApply (parameter) {
  return axios({
    url: api.delApply,
    method: 'post',
    data: parameter
  })
}

export function createApply (parameter) {
  return axios({
    url: api.createApply,
    method: 'post',
    data: parameter
  })
}

export function incomeLog (parameter) {
  return axios({
    url: api.incomeLog,
    method: 'get',
    params: parameter
  })
}